<?php

namespace App\Http\Resources;

use Illuminate\Http\Resources\Json\Resource;

class Notify extends Resource
{
    /**
     * Transform the resource into an array.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'notify_id' => $this->id  ,
            'data'   => $this->data,
            'created_at' => $this->created_at->toDateString(),
            'read_at'   => $this->read_at,
            'ym' => $this->created_at->toTimeString(),
        ];
    }
}
